package com.dwxt.community.aiequipment.sellmachine.service;

import com.dwxt.common.util.IDUtils;
import com.dwxt.community.aiequipment.sellmachine.entity.SellMachineBreakdownRecord;
import com.dwxt.community.dao.SellMachineBreakdownRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * @program: intelligentcity
 * @description:
 * @author
 * @create: 2020/05/13
 */
@Service
public class SellMachineBreakdownRecordService {
    @Autowired
    private SellMachineBreakdownRecordMapper sellMachineBreakdownRecordMapper;

    public int insert(SellMachineBreakdownRecord breakdownRecord) {
        Date date = new Date();
        breakdownRecord.setRecordId(IDUtils.genItemId());
        breakdownRecord.setCreateTime(date);
        breakdownRecord.setUpdateTime(date);
       return sellMachineBreakdownRecordMapper.insertSelective(breakdownRecord);
    }
}
